FROM ubuntu:20.04

# 避免交互式配置
ENV DEBIAN_FRONTEND=noninteractive

# 更新系统并安装Python3和pip
RUN apt-get update && \
    apt-get install -y python3 python3-pip && \
    rm -rf /var/lib/apt/lists/*

# 设置工作目录
WORKDIR /app

# 复制依赖文件
COPY requirements.txt .

# 安装Python依赖
RUN pip3 install -r requirements.txt

# 复制应用代码
COPY app.py .

# 暴露端口
EXPOSE 9527 9528 9529

# 启动命令
CMD ["python3", "app.py"]
